package com.apex.common.entity;

import com.apex.common.constant.CommonConstants;
import com.apex.common.constant.RestCodeConstants;

/**
 * Create by IntelliJ IDEA
 * 用户：王建
 * 日期：2018-4-3
 */
public class JsonEntity<T>{

    private Integer state;

    private String msg;

    private T data;

    public <T>JsonEntity(){
        this.state=200;
        this.msg="ok";
    }

    public <T> JsonEntity(String msg){
        this.state= RestCodeConstants.BUSINESS_ERROR_CODE;
        this.msg=msg;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
